package com.evl.constant;

public enum CarriageLocationType {
	top("上", "atop"), 
	middle("中", "bmiddle"),
	bottom("下", "cbottom");

    String code;
    String message;

    CarriageLocationType(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueStrOf(String status) {
        if (status == null) {
            return "";
        } else {
            for (CarriageLocationType s : CarriageLocationType.values()) {
                if (s.getCode().equals(status)) {
                    return s.getMessage();
                }
            }
            return "";
        }
    }
}
